package com.example.lotterysystem.service;


import com.example.lotterysystem.controller.param.DrawPrizeParam;
import com.example.lotterysystem.controller.param.ShowWinningRecordsParam;

import com.example.lotterysystem.dao.dataobject.WinningRecordDO;
import com.example.lotterysystem.service.dto.WinningRecordDTO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface DrawPrizeService {
    /**
     * 异步抽奖,此接口只做奖品数校验即可返回
     * @param param
     * @return
     */
    void drawPrize(DrawPrizeParam param);

    /**
     * 校验抽奖参数
     * @param param
     */
    void checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存中奖名单
     * @param param
     * @return
     */
    List<WinningRecordDO> saveWinnerRecords(DrawPrizeParam param);

    /**
     * 删除活动或者奖品下的中奖记录
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId, Long prizeId);

    /**
     * 获取中奖记录
     * @param param
     * @return
     */
    List<WinningRecordDTO> getRecord(ShowWinningRecordsParam param);
}
